#ifndef __HWCONFIG_H__
#define __HWCONFIG_H__
#include "basictype.h"

#define HWREG32(addr) *((volatile UINT32 *)addr)
#define HWREG16(addr) *((volatile UINT16 *)addr)
#define HWREG8(addr) *((volatile UINT8 *)addr)

typedef struct {
  UINT32 ulcon;
  UINT32 ucon;
  UINT32 ufcon;
  UINT32 umcon;
  UINT32 utrstat;
  UINT32 uerstat;
  UINT32 ufstat;
  UINT32 umstat;
#ifdef __BIG_ENDIAN
  UINT8 res1[3];
  UINT8 utxh;
  UINT8 res2[3];
  UINT8 urxh;
#else /* Little Endian */
  UINT8 utxh;
  UINT8 res1[3];
  UINT8 urxh;
  UINT8 res2[3];
#endif
  UINT32 ubrdiv;
}s3c24x0_uart;

extern void hwconfig_setValue32(UINT32 regAddr, UINT32 val);
extern void hwconfig_setValue16(UINT32 regAddr, UINT16 val);
extern void hwconfig_setValue8(UINT32 regAddr, UINT8 val);
extern void hwconfig_getValue32(UINT32 regAddr, UINT32 *val);
extern void hwconfig_getValue16(UINT32 regAddr, UINT16 *val);
extern void hwconfig_getValue8(UINT32 regAddr, UINT8 *val);

#endif //__HWCONFIG_H__